package com.springdoor.wx.api.service.impl;

import com.springdoor.wx.api.entity.SprdGoodsCollect;
import com.springdoor.wx.api.mapper.SprdGoodsCollectMapper;
import com.springdoor.wx.api.service.SprdGoodsCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SprdGoodsCollectServiceImpl implements SprdGoodsCollectService {

    @Autowired
    private SprdGoodsCollectMapper collectMapper;

    @Override
    public List<SprdGoodsCollect> findListByUserId(Long userId) {
        return collectMapper.findListByUserId(userId);
    }

    @Override
    public Integer findCollNumByUserId(Long userId) {
        return collectMapper.findCollNumByUserId(userId);
    }

    @Override
    public Integer findCollByGShopId(SprdGoodsCollect sprdGoodsCollect) {
        return collectMapper.findCollByGShopId(sprdGoodsCollect);
    }

    @Override
    public int insertSprdGoodsCollect(SprdGoodsCollect sprdGoodsCollect) {
        return collectMapper.insertSprdGoodsCollect(sprdGoodsCollect);
    }

    @Override
    public int updateSprdGoodsCollect(SprdGoodsCollect sprdGoodsCollect) {
        return collectMapper.updateSprdGoodsCollect(sprdGoodsCollect);
    }

    @Override
    public int deleteSprdGoodsCollectByUserId(Long userId) {
        return collectMapper.deleteSprdGoodsCollectByUserId(userId);
    }
}
